/**
 * 
 */
package at.ac.tuwien.swa075.telco.auc.dao;

import at.ac.tuwien.swa075.telco.auc.AuthenticationStatus;


/**
 * A data object containing the properties that should be persisted.
 * 
 * @author Johannes Mayr <johannes.mayr@chello.at>
 */
public class ProfileTO {

	/**
	 * The id of the authentication entry.
	 */
	public long id;

	/**O
	 * The subscirber identity.
	 */
	public String imsi;

	/**
	 * The pin code used to verify the subscribers identity.
	 */
	public String pin;

	/**
	 * The authentication status.
	 */
	public AuthenticationStatus status;

	/**
	 * Counts consecutive authentication failures.
	 */
	public int failureCount;

	/**
	 * @return the failureCount
	 */
	public int getFailureCount() {
		return failureCount;
	}

	/**
	 * @param failureCount the failureCount to set
	 */
	public void setFailureCount(int failureCount) {
		this.failureCount = failureCount;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the imsi
	 */
	public String getImsi() {
		return imsi;
	}

	/**
	 * @param imsi the imsi to set
	 */
	public void setImsi(String imsi) {
		this.imsi = imsi;
	}

	/**
	 * @return the pin
	 */
	public String getPin() {
		return pin;
	}

	/**
	 * @param pin the pin to set
	 */
	public void setPin(String pin) {
		this.pin = pin;
	}
	
	/**
	 * @return the status
	 */
	public AuthenticationStatus getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(AuthenticationStatus status) {
		this.status = status;
	}
	
	int getStatusInt() {
		return this.status.ordinal();
	}
	
	void setStatusInt(int status) {
		this.status = AuthenticationStatus.values()[status];
	}
}
